package com.jiang.spring_security_singleboot.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

import lombok.Data;

/**
 * @中软华腾软件系统有限公司,未经授权不得擅自传播
 * @类描述:
 * @类名称:Role
 * @作者: 蒋正午
 * @编辑时间: 2021/4/26 23:18
 * @版本: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysRole implements GrantedAuthority {

	private Integer id;

	private String roleName;

	private String roleDesc;

	// 这个不用返回到前端，所以配置忽略
	@JsonIgnore
	@Override
	public String getAuthority() {

		return this.roleName;
	}
}
